
nums = input("please input two numbers:\n").split()
for i in range(len(nums)):
    print (nums[i])

m = int(nums[0])
n = int(nums[1])
print (m)
print (n)

list_lights = []
str_lights_on = ""

for people_id in range(m):
    if (people_id == 0):
        for light_id in range(n):
            list_lights[light_id] = 0
    else:
        for light_id in range(n):
            if ((light_id + 1) % (people_id + 1) == 0):
                list_lights[light_id] = 1

for light_id in range(n):
    if (list_lights[light_id] == 1):
        if (len(str_lights_on) == 0):
            str_lights_on = str(light_id + 1)
        else:
            str_lights_on = str_lights_on + "," + light_id + 1

print (str_lights_on)
